package cn.felord.common.util;

import org.springframework.util.StringUtils;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Dax
 * @since 11:47  2018/9/28
 */
public final class IpUtil {
    private static final String X_FORWARDED_FOR="x-forwarded-for";
    private static final String PROXY_CLIENT_IP="Proxy-Client-IP";
    private static final String WL_PROXY_CLIENT_IP="WL-Proxy-Client-IP";
    private static final String LOCAL_HOST_IPV4="127.0.0.1";
    private static final String LOCAL_HOST_IPV6="0:0:0:0:0:0:0:1";


    private IpUtil() {
    }

    public static String getRemoteAddr(HttpServletRequest request) {
        String  ip= request.getHeader(X_FORWARDED_FOR);
        if (StringUtils.hasText(ip)||"unknown".equalsIgnoreCase(ip)) {

        }
     return null;
    }




}
